package org.oltu.oauth.authorization.server;

import static org.junit.Assert.*;

import org.apache.oltu.oauth2.client.request.OAuthClientRequest;
import org.apache.oltu.oauth2.common.OAuthProviderType;
import org.apache.oltu.oauth2.common.exception.OAuthSystemException;
import org.apache.oltu.oauth2.common.message.types.GrantType;
import org.apache.oltu.oauth2.common.message.types.ResponseType;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;

public class AuthorizationControllerTestCase {

	@Before
	public void setUp() throws Exception {
	}

	@After
	public void tearDown() throws Exception {
	}

	@Test
	public void testAuthorization() throws OAuthSystemException {
		OAuthClientRequest request = OAuthClientRequest
				.authorizationLocation("http://localhost:58080/oauth/authorization")
				.setResponseType(ResponseType.CODE.toString())
                .setClientId("your-facebook-application-client-id")
                .setRedirectURI("http://localhost:58080/")
                .setScope("CRUD")
                .setState("CLIENT")
                .buildQueryMessage();
		
        System.out.println(request.getLocationUri());
	}

}
